<template>
	<div id="visit_record" class="dialog animated" :class="open? 'fadeIn':'fadeOut'" v-show="show">
		<div class="panel animated" :class="open? 'zoomIn':''">
			<div class="title">
				{{audition.className}}
				<div class="close" @click="cancel()"></div>
			</div>
			<div class="form">
				确定删除该班级吗？
			</div>
			
			<div class="btn_div">
				<div class="btn_sure" @click="sure()">确 定</div>
				<div class="btn_cancel" @click="cancel()">取 消</div>
			</div>
		</div>
	</div>
</template>

<script>
var vm;
export default {
	data : function() {
		return {
			show : false,
			open : false,
			msg : null,
			audition : {}
		}
	},
	methods : {
		init : function(audition) {
			vm.show = true;
			vm.open = true;
			vm.audition = audition;
		},
		sure : function() {
			var param = {
				classIds : [vm.audition.classId],
				_wait : ""
			}
			api.auditionDelete(param).then(function(data) {
				tool.message({showClose: true, message: "删除成功", type: 'success'});
				vm.$emit('callback');
				vm.cancel();
			});
		},
		cancel : function() {
			vm.open = false;
			setTimeout(function() {
				vm.show = false;
			},500);
		},
	},
	created : function() {
		vm = this;
	}
}
</script>

<style scoped src="@/style/module/dialog.css"></style>
<style scoped src="@/style/module/table.css"></style>
<style scoped>

	.panel {
		width: 5rem;
	}
	.form {
		padding: 0.1rem 0.3rem 0 0.4rem;
		color: #666666;
		font-size: 0.16rem;
	}
	
</style>